package dao;
import org.hibernate.cfg.Configuration;
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 *
 * @author Silvita
 */
public class MyConfig {
    
    private Configuration config;

    public MyConfig() throws Exception {
        try{
            this.config = new Configuration().configure("model/hibernate.cfg.xml");

        }catch(Exception e){
            throw new Exception("No se pudo crear la configuración personalizada: " + e.getMessage());
        }
    }

    public Configuration getConfig() {
        return config;
    }

    public void setConfig(Configuration config) {
        this.config = config;
    }
}
